package com.company.线程.推荐线程池;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author uguoy089
 * @Description:
 * @Date: 2021/5/12 15:08
 * <p>
 * 为了避免资源风险
 * 手动创建线程池--不允许Executors.newFixedThreadPool创建线程池
 */

public class Test {
    public static void main(String[] args) {
        new Pools().pool(10, 15, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>());
    }
}
